<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ request.getContextPath() + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<title>Insert title here</title>
<script type="text/javascript">
 function reloadCode() {
	 var time = new Date().getTime();
	 document.getElementById("safecode").src ="<%=request.getContextPath()%>/servlet/ImageServlet?d="+time;
 }
</script>
</head>
<body>
<form action="<%=request.getContextPath()%>/servlet/LoginServlet">
请输入验证码：<input type="text" name = "checkcode">
<img alt="验证码"  id="safecode" src="<%=request.getContextPath()%>/servlet/ImageServlet">
<a href = "javascript:reloadCode();">看不清楚</a>
<input type="submit" value="submit">
</form>
</body>
</html>